package com.itheima._05泛型类;

/**
 * @Description Demo051
 * @Author GreenHand_Lu
 * @Date 2025-07-19
 */
public class Demo051 {

    public static void main(String[] args) {
        //目标：操作自定义泛型类

        MyArrayList<String> myArrayList = new MyArrayList<>();
        myArrayList.add("a");
        myArrayList.add("b");
        myArrayList.add("c");
        System.out.println(myArrayList);
        myArrayList.set(1,"bb");
        System.out.println(myArrayList);
        myArrayList.remove(1);
        System.out.println(myArrayList);
        System.out.println(myArrayList.get(1));//c
    }
}
